package db;

import bean.Goods;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

public class GoodsMockTable {
    private static Map<String, Goods> goodses = new LinkedHashMap<String, Goods>();

    static {
        goodses.put("苹果8", new Goods("0001", "苹果8", 2000.0, 10));
        goodses.put("苹果9", new Goods("0002", "苹果9", 2000.0, 10));
        goodses.put("苹果10", new Goods("0003", "苹果10", 2000.0, 10));
        goodses.put("苹果11", new Goods("0004", "苹果11", 2000.0, 10));
        goodses.put("苹果12", new Goods("0005", "苹果12", 2000.0, 10));
    }

    public static Collection<Goods> getAllGoodses() {
        return goodses.values();
    }

    public static Goods getGoodsByName(String name) {
        return goodses.get(name);
    }

}